1. Technical Field
The present invention relates generally to database systems for digital computers, and more specifically to a system and method for enforcing referential constraints when changes are made to the database.
2. Description of the Related Art
In order to increase the speed of database access in digital computer systems, source files containing database access commands can be compiled into access plans. The access plans contain low-level procedural statements to access databases efficiently. Instead of interpreting database access commands at run time in a database manager, the access plans are executed to improve system performance.
Numerous constraints must be satisfied when updating a database in order to maintain its referential integrity. Referential integrity refers to a state of consistency across the database. Referential integrity is enforced by checking all changes made to the database to ensure that they meet the consistency requirements.
In current systems, when changes are made to a table in a database, a determination is made of all of the constraints relevant to such change. The other tables which are affected by such constraints are identified, and routines are executed to perform the necessary consistency checks. The time taken to determine the relevant consistency checks and identify the involved tables can be significant, and contributes to a decrease in overall system performance.
It would be desirable to provide a system and method within a database system which minimizes the time required to perform consistency checks when changes are made to the database.